package com.project.service;

import com.project.entity.TeacherInfo;
import com.project.myBeans.TeacherInfoDetail;

import java.util.List;

/**
 * Created by WheelChen on 2017/5/2.
 */
public interface TeacherInfoService {
    /**
     * author: WheelChen
     * date: 2017-5-1
     * function: 增加教师信息
     *
     * @param teacherInfo 教师信息
     * @return
     */
    int add(TeacherInfo teacherInfo);

    /**
     * author: WheelChen
     * date: 2017-5-1
     * function: 根据userId删除教师信息
     *
     * @param userId
     * @return
     */
    int removeByUserId(Integer userId);

    /**
     * author: WheelChen
     * date: 2017/6/24
     * function: 根据id修改教师信息
     *
     * @param teacherInfo
     * @return
     */
    int modifyById(TeacherInfo teacherInfo);

    /**
     * author: WheelChen
     * date: 2017-5-1
     * function: 根据userId修改教师信息
     *
     * @param teacherInfo
     * @return
     */
    int modifyByUserId(TeacherInfo teacherInfo);

    /**
     * author: WheelChen
     * date: 2017-5-13
     * function: 根据查找教师信息
     *
     * @param id
     * @return
     */
    TeacherInfo findOne(Integer id);

    /**
     * author: WheelChen
     * date: 2017-5-1
     * function: 根据用户id查找教师信息
     *
     * @param userId
     * @return
     */
    TeacherInfo findOneByUserId(Integer userId);

    /**
     * author: WheelChen
     * date: 2017/7/3
     * function: 根据userId查找教师详情
     *
     * @param userId
     * @return
     */
    TeacherInfoDetail findOneDetailByUserId(Integer userId) throws Exception;

    /**
     * author: WheelChen
     * date: 2017/7/15
     * function: 根据大学id查找老师信息
     * @param universityid 大学id
     * @return
     */
    List<TeacherInfoDetail> findBatchByUniversityid(Integer universityid) throws Exception;

    /**
     * author: WheelChen
     * date: 2017/7/25
     * function: 根据schoolId查找老师详细信息
     *
     * @param teacherInfo
     * @return
     */
    List<TeacherInfoDetail> findBatchBySchoolIdCondition(TeacherInfo teacherInfo) throws Exception;

    /**
     * author: WheelChen
     * date: 2017/7/28
     * function: 根据userId更新用户表信息 创建教师信息表信息
     * 
     * @param teacherInfoDetail 教师详细信息（用户表 + 教师信息表）
     * @return
     */
    int addDetailOne(TeacherInfoDetail teacherInfoDetail) throws Exception;

    /**
     * author: WheelChen
     * date: 2017/7/28
     * function: 根据id更新用户表信息 根据id更新教师信息表
     *
     * @param teacherInfoDetail 教师详细信息（用户表 + 教师信息表）
     * @return
     */
    int modifyDetailOne(TeacherInfoDetail teacherInfoDetail) throws Exception;
}
